const getTokens = function getTokens(list) {
  const arr = [];
  let token;
  for (token of list) {
    arr.push({
      value: token.value != null ? token.value : token.type.label,
      label: token.type.label,
      start: token.start,
      end: token.end,
    });
  }
  return arr;
};

export default getTokens;
